package model

import (
	"gorm.io/gorm"
	"time"
)

type HouseReservation struct {
	Id              uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	HouseId         uint           `gorm:"column:house_id;type:bigint(20) UNSIGNED;not null;default:0;" json:"house_id"`
	UserId          uint           `gorm:"column:user_id;type:bigint(20) UNSIGNED;not null;default:0;" json:"user_id"`
	ReservationTime time.Time      `gorm:"column:reservation_time;type:datetime(3);not null;" json:"reservation_time"`
	CreatedAt       time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt       time.Time      `gorm:"column:updated_at;type:datetime(3);not null;" json:"updated_at"`
	DeletedAt       gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (hr *HouseReservation) TableName() string {
	return "house_reservation"
}
